%% Get the neuron ids from groups.dat file from nnrobot simulation results.
%
% [first_neuron_id last_neuron_id2] = get_group_indices(area_name, type_name)
% neuron id's are not zero based, as in nnrobot, but start at 1.
function [neuron_id1 neuron_id2] = get_group_indices(area_name, type_name)

read_groups; % Assumes groups.dat has the neural area data


index = [];
for i=1:length(areas)
    if strcmp( deblank(areas{i}), area_name) && strcmp( type_name, deblank(celltype{i})) 
        index = i;
        break;
    end
end
if isempty(index)
    disp([area_name ' ' type_name ' is not in groups.dat.']);
    return;
end

neuron_id1 = neuron_id(index,1);
neuron_id2 = neuron_id(index,2);

neuron_id1=neuron_id1+1;
neuron_id2=neuron_id2+1;
 